1. Field of the Invention
This invention generally relates to an electronic musical instrument and more particularly to a signal generator (hereunder sometimes referred to as a parameter signal generator) for generating signals (hereunder sometimes referred to as parameter signals) indicating parameters such as a musical tone waveform and an envelope waveform and so forth.
2. Description of the Background Art
In electronic musical instruments such as a MIDI (Musical Instrument Digital Interface) device (i.e. a digital musical device employing the MIDI specification), various information (hereunder sometimes referred to as parameter information) on parameters used for generating musical sounds is processed (for example, parameters representing a musical tone waveform, an envelope waveform, another waveform obtained by synthesizing a musical tone waveform, and an envelope waveform, the levels of which vary with time. In addition to such parameters, the parameter information includes information on data, the value of which varies with time, indicating a reading address of the parameter representing, for example, the musical tone waveform in a storage. Note, all kinds of waveforms such as a rectangular waveform, a triangular waveform, a sinusoidal waveform, and a waveform of a natural sound may be used as the musical tone waveform.
Hereinafter, as examples of conventional parameter signal generators, an envelope waveform generator for generating a parameter or data to be used for producing an envelope waveform, and a waveform data reading address generator for generating a parameter indicating a reading address of data indicating a musical tone waveform stored in a storage, will be described in detail with reference to FIGS. 15 and 16, respectively.
FIG. 16 shows a conventional envelope waveform generator provided in an electronic musical instrument, and this device corresponds to an envelope waveform generating device 29 of the present invention of FIG. 4 as described later. Further, the circuit of FIG. 4 corresponds to tone generators 15, 16, . . . of FIG. 3, as also described later.
In the circuit shown in FIG. 16, level data LVLi and speed data SPDi are read from a read-only memory (not shown) by a control unit (not shown), and all of the data read therefrom is written into an envelope forming data storing memory 239. Note, the level data LVLi and the speed data SPDi represent the value of an objective level and the value of an objective rate in each phase of an envelope, respectively.
Further, at the time of a KEY ON (namely, at the time of turning on a voice playing key (not shown) of the electronic musical instrument) or prior to the time of a KEY ON, data indicating the value of the amplitude or level of the envelope at the starting point thereof (hereunder referred to as the initial value of the amplitude of the envelope) is read from the read-only memory (ROM) by the control unit, and the initial value LVLO of the amplitude of the envelope is then set in an initial amplitude value holding memory 230. When the electronic musical instrument starts to radiate musical sounds, the initial value LVLO is supplied to an adder 234 through a selector 232.
The level data LVLi, however is read from an address of the memory 239, which is indicated by address data input thereto by a reading address generator 240, the two's complement of the data LVLi (namely, a negative value obtained by reversing the sign of the data LVLi) is then obtained by inverting each bit thereof by a complementer 233, and further, the thus-obtained two's complement is added to the initial amplitude value LVLO of the envelope by the adder 234. Accordingly, the value of the objective level indicated by the data LVLi is subtracted from the initial value LVLO of the amplitude of the envelope.
Envelope data ENV is also input to the selector 232, from an amplitude holding circuit 238, as described later, and after the radiation of the musical sounds is started, the envelope data ENV is input to the adder 234, whereupon the value of the objective level indicated by the data LVLi is subtracted from the value indicated by the envelope data ENV. Note, the envelope data ENV represents the current value of the level or amplitude of the envelope each time the data ENV is input to the adder 234.
Subsequently, subtraction data representing the result of the subtraction (the current value of the envelope data ENV--the value of the objective level indicated by the data LVLi) is multiplied by the speed data SPDi sent from the memory 239 by a multiplier 235. Note, before being input to the multiplier 235, the speed data SPDi is read from the address, indicated by the address data from the reading address generator 240; of the memory 239. Further, multiplication data representing the result of the multiplication, i.e., (the current value of the envelope data ENV-the value of the objective level indicated by the data LVLi).times.(the value of the speed data SPDi), is added to the level data LVLi by an adder 236. Furthermore, data representing the result of this addition is stored in the amplitude holding circuit 238 and is output to a multiplier (not shown) as the envelope data ENV, whereby the envelope data ENV as shown in FIG. 6 is changed at a rate corresponding to the speed data SPDi. Also, the size of a step used for representing the change of the data ENV is changed in accordance with the value of the subtraction data (the current value of the envelope data ENV-the value of the objective level indicated by the data LVLi), and accordingly, as the value of the data ENV approaches that of the data LVLi, the size of the step used for representing the change of the data ENV is reduced.
Further, a KEY ON signal, the level of which becomes high while the playing key (hereunder sometimes referred to simply as the key) of a keyboard (not shown) is operated, is input to a KEY ON event detector 231, and a KEY ON event signal, the level of which becomes high at the time corresponding to the leading edge of the KEY ON signal and becomes low after the musical sounds are radiated, is then output from the detector 231. This KEY ON event signal is output to the selector 232, and upon receipt of the KEY ON event signal, the selector 232 selects the initial value LVLO and the output of the selector 232 is switched to a signal indicating the value LVLO. The KEY ON event signal is also output to and resets the reading address generator 240. Further, the above-described KEY ON signal is output to the reading address generator 240, which controls an address counting operation thereof in response to the KEY ON signal.
Moreover, the multiplication data (the current value of the envelope data ENV-the value of the objective level indicated by the data LVLi).times.(the value of the speed data SPDi) is sent from the multiplier 235 to a comparator 237, whereupon it is determined whether or not the multiplication data is equal to 0. If this data is equal to 0, a coincidence signal is output from the comparator 237 as a phase terminating signal and input to the reading address generator 240, whereupon the reading address data is incremented by 1, and accordingly, the level data LVLi and the speed data SPDi for the next phase are read from the memory 239. The envelope generator then begins to generate the envelope data ENV to be used in the next phase.
FIG. 15 shows a conventional waveform data reading address generating device corresponding to the device 28 of the present invention, as shown in FIG. 4.
In the circuit of FIG. 15, loop top data LTi, loop end data LEi, and loop count data LCi are read from a ROM (not shown) by a control unit (not shown), and all of this data is then written into a memory 234 for storing control data used for regulating the reading address of waveform data. Note, as seen from FIG. 8, the loop top data LTi represents the leading address of a loop (hereunder sometimes referred to as a loop section) which is a part or section of the waveform to be repeatedly reproduced; the loop end data LEi represents the end address of the loop, and the loop count data LCi represents the number of times the reading of the waveform data corresponding to the loop is repeated.
Further, at a KEY ON or prior to the KEY ON, read operation starting address data ST is read from the ROM by the control unit, and this read operation starting address data ST is then set in a starting address holding memory 270. Similarly, at a KEY ON or prior to the KEY ON, phase angle step data PD is read from the ROM by the control unit, and this read phase angle step data PD is set in a phase angle step data memory 271.
As shown in FIG. 8, the data ST indicates the value of the reading address data RAD, i.e., the address, from which an operation of reading the musical tone waveform data WD is to be started, and the phase angle step data PD indicates the value of the increment (hereunder sometimes referred to as the incrementing step) used for incrementing the reading address data RAD. The address data RAD is updated by serially adding the phase angle step data PD thereto, and as the value indicated by the data PD becomes larger, the rate at which the data WD is read becomes larger and the pitch of the radiated musical sound becomes higher. Further, various timbres can be obtained by variously changing the read operation starting address data ST, the loop top data LTi, the loop end data LEi, and the loop count data LCi corresponding to the data WD.
When the radiation of musical sounds is started, the read operation starting address data ST set in the memory 270 is output through a selector 272 to an adder 273, whereupon the data PD from the memory 271 is added to the received data ST. Thereafter, addition data representing the result of this addition is output, through a selector 278, to and is stored in a waveform data reading address holding circuit 279. This addition data is also output to a waveform data storing memory (not shown) as the reading address data RAD, and after the radiation of musical sounds is started, the addition data is further output through the selector 272 to the adder 273, whereupon the data PD is again added to the addition data. Namely, the data PD is accumulated and added to the data RAD in an addition loop circuit composed of the adder 273 and the circuit 279.
Further, the two's complement of the data RAD from the adder 273 (i.e., a negative value obtained by reversing the sign of the data RAD) is obtained by inverting each bit thereof by a complementer 274, the thus obtained two's complement is added to the loop end data LEi from the memory 284 by the adder 275, and accordingly, the data RAD is subtracted from the data LEi.
This subtraction process is repeated so that part of the data WD corresponding to the loop section is read and further, the value indicated by the data RAD becomes equal to that indicated by the loop end data LEi. When this subtraction process is further effected, and the value indicated by the data RAD is higher than that indicated by the data LEi, a carry signal is output from an adder 275. This carry signal is fed to a difference holding circuit 276 as a latch signal, and thus fraction data indicating that the value indicated by the data RAD is higher than that indicated by the data LEi is latched by the circuit 276.
This fraction data is added to the loop top data LTi by an adder 277, whereby the fraction is compensated. Further, data indicating the result of this addition is output through the selector 278 to the waveform data reading address holding circuit 279 as updated data RAD, and thus the value indicated by the reading address data RAD to be used for reading the data WD jumps from that indicated by the loop end data LEi to that indicated by the loop top data LTi. At that time, the fraction corresponding to the difference of the value indicated by the data RAD to that indicated by the data LEi is also compensated. The carry signal from the adder 275 is supplied to the selector 278 as a loop end attainment signal, and as a result, the selector 278 selects the input from the adder 277. Further, the carry signal is input to a loop counter 281, whereupon the loop count indicating the number of times the data WD corresponding to the loop is actually read is incremented.
The value of the loop count obtained by the loop counter 281 is supplied to a comparator 283, whereupon it is determined whether or not the loop count is equal to the value indicated by the loop count data LCi. If the loop count is equal to the value indicated by the data LCi, a coincidence signal is output from the comparator 283 and input as a loop terminating signal to a reading address generator 285, whereupon the reading address data is incremented by 1 and the loop top data LTi, the loop end data LEi, and the loop count data LCi for the next loop are read from memory 284. The reading address generator then begins the reproduction of the next loop. Further, the coincidence signal from the comparator 283 is output to the loop counter 281 through a NOR gate 282 as a clearing signal.
Also, a KEY ON signal, the level of which becomes high while the key of the keyboard (not shown) is operated, is input to a KEY ON event detector 280, and a KEY ON event signal, the level of which becomes high at the time corresponding to the leading edge of the KEY ON signal and becomes low after the musical sounds are radiated, is then output from the detector 280. This KEY ON event signal is input to the loop counter 281 through the NOR gate 282 as the clearing signal, and further, is input to and resets the reading address generator 285.
Nevertheless, in the above-described conventional generators, as the number of phases of the envelope and of the loop sections increases, the quantity of the data to be stored in the memories 239 and 284 is increased. Further, to realize musical sounds which are closely allied to natural sounds and have complicated varying waveforms, a large amount of data must be set in the memories 239 and 284, which results in an increase of the memory capacity of the memories 239 and 284 in the conventional generators, and thus the conventional parameter signal generators have a defect in that they are expensive.
As a countermeasure, a system has been proposed in which the level data LVLi, the speed data SPDi, the loop top data LTi, the loop end data LEi, and the loop count data LCi are stored in a general-use memory, and this data is read by a central processing unit (CPU) from the general-use memory every time such data is needed, and further, the thus-read data is output by the CPU to the envelope waveform generator and the waveform data reading address generator. Accordingly, the cost of the envelope waveform generator and the waveform data reading address generator of this system becomes lower that of than the previously-described conventional generators. Also, a large-scale integration of the tone generators 15, 16, . . . including the envelope waveform generator and the waveform data reading address generator can be facilitated, and further, the cost of the storage for storing the data as above-described can be lowered because a general-use memory may be employed as such a storage.
Nevertheless, this conventional system using a general-use memory has a drawback in that the burden on the controller, such as the CPU, becomes large, and thus processing is delayed and it becomes very difficult to obtain a smooth radiation of musical sounds with this system, because the CPU must send data to the envelope waveform generator and the waveform data reading address generator every time such data is needed. Due to recent technological advances, however, high speed processors are now available, and therefore, even though the data required by the envelope waveform generator and the waveform data reading address generator is not stored in these generators but in another storage, musical sounds can be smoothly radiated by employing such a high speed processor as the CPU. The object of the present invention is to eliminate the defects of the above-described conventional parameter signal generators.
Further, in the above-described conventional generators, the number of repetitions of the reproduction of a loop is predetermined, i.e., the reproduction of a loop is limited by the required number of repetitions, and thus where the pitch of the musical sound to be radiated is low and the rate or speed of reading the data WD is small, the time needed to reproduce a loop becomes long. Namely, as shown in FIG. 17 (1), the ratio of the time taken to reproduce the loop to the time from the beginning of the radiation of a musical sound to the termination thereof becomes large. Conversely, where the pitch of the musical sound to be radiated is high, and thus the rate of reading the data WD is large, a time taken to reproduce a loop becomes short. Further, as shown in FIG. 17 (2), the ratio of the time taken to reproduce the loop to the time from the beginning of the radiation of a musical sound to the termination thereof becomes large.
The result of this is that the radiated musical sound includes an unnecessary changing factor or component, which is variable depending on the change in pitch of the musical sound to be radiated. Although a process of changing the proportion of higher harmonic components to the whole in response to the change in pitch is widely employed in the art, the higher harmonic components are not really necessary, and offend the ear when reproducing such a loop. Further, such an unnecessary factor causes a discrimination of the difference between the musical sound actually radiated by the electronic musical instrument and the corresponding musical sound issued by a conventional musical instrument such as a piano.